#!/usr/bin/env python3
# -*- coding:utf-8 -*-

# RGB配色表 http://www.wahart.com.hk/rgb.htm
# RGB颜色对照表 https://tool.oschina.net/commons?type=3
# RGB颜色值与十六进制颜色码转换工具 https://www.sioe.cn/yingyong/yanse-rgb-16
# Color Names | Graphviz http://www.graphviz.org/doc/info/colors.html
# 数字图像处理 补色与反色_qq_34725005的博客-CSDN博客_数字图像处理反色 https://blog.csdn.net/qq_34725005/article/details/87882604

rgbs = {
    "Snow":                 ("#FFFAFA", (255, 250, 250)),
    "GhostWhite":           ("#F8F8FF", (248, 248, 255)),
    "WhiteSmoke":           ("#F5F5F5", (245, 245, 245)),
    "Gainsboro":            ("#DCDCDC", (220, 220, 220)),
    "FloralWhite":          ("#FFFAF0", (255, 250, 240)),
    "OldLace":              ("#FDF5E6", (253, 245, 230)),
    "Linen":                ("#FAF0E6", (250, 240, 230)),
    "AntiqueWhite":         ("#FAEBD7", (250, 235, 215)),
    "PapayaWhip":           ("#FFEFD5", (255, 239, 213)),
    "BlanchedAlmond":       ("#FFEBCD", (255, 235, 205)),
    "Bisque":               ("#FFE4C4", (255, 228, 196)),
    "PeachPuff":            ("#FFDAB9", (255, 218, 185)),
    "NavajoWhite":          ("#FFDEAD", (255, 222, 173)),
    "Moccasin":             ("#FFE4B5", (255, 228, 181)),
    "Cornsilk":             ("#FFF8DC", (255, 248, 220)),
    "Ivory":                ("#FFFFF0", (255, 255, 240)),
    "LemonChiffon":         ("#FFFACD", (255, 250, 205)),
    "Seashell":             ("#FFF5EE", (255, 245, 238)),
    "Honeydew":             ("#F0FFF0", (240, 255, 240)),
    "MintCream":            ("#F5FFFA", (245, 255, 250)),
    "Azure":                ("#F0FFFF", (240, 255, 255)),
    "AliceBlue":            ("#F0F8FF", (240, 248, 255)),
    "lavender":             ("#E6E6FA", (230, 230, 250)),
    "LavenderBlush":        ("#FFF0F5", (255, 240, 245)),
    "MistyRose":            ("#FFE4E1", (255, 228, 225)),
    "White":                ("#FFFFFF", (255, 255, 255)),
    "Black":                ("#000000", (  0,   0,   0)),
    "DarkSlateGray":        ("#2F4F4F", ( 47,  79,  79)),
    "DimGrey":              ("#696969", (105, 105, 105)),
    "SlateGrey":            ("#708090", (112, 128, 144)),
    "LightSlateGray":       ("#778899", (119, 136, 153)),
    "Grey":                 ("#BEBEBE", (190, 190, 190)),
    "LightGray":            ("#D3D3D3", (211, 211, 211)),
    "MidnightBlue":         ("#191970", ( 25,  25, 112)),
    "NavyBlue":             ("#000080", (  0,   0, 128)),
    "CornflowerBlue":       ("#6495ED", (100, 149, 237)),
    "DarkSlateBlue":        ("#483D8B", ( 72,  61, 139)),
    "SlateBlue":            ("#6A5ACD", (106,  90, 205)),
    "MediumSlateBlue":      ("#7B68EE", (123, 104, 238)),
    "LightSlateBlue":       ("#8470FF", (132, 112, 255)),
    "MediumBlue":           ("#0000CD", (  0,   0, 205)),
    "RoyalBlue":            ("#4169E1", ( 65, 105, 225)),
    "Blue":                 ("#0000FF", (  0,   0, 255)),
    "DodgerBlue":           ("#1E90FF", ( 30, 144, 255)),
    "DeepSkyBlue":          ("#00BFFF", (  0, 191, 255)),
    "SkyBlue":              ("#87CEEB", (135, 206, 235)),
    "LightSkyBlue":         ("#87CEFA", (135, 206, 250)),
    "SteelBlue":            ("#4682B4", ( 70, 130, 180)),
    "LightSteelBlue":       ("#B0C4DE", (176, 196, 222)),
    "LightBlue":            ("#ADD8E6", (173, 216, 230)),
    "PowderBlue":           ("#B0E0E6", (176, 224, 230)),
    "PaleTurquoise":        ("#AFEEEE", (175, 238, 238)),
    "DarkTurquoise":        ("#00CED1", (  0, 206, 209)),
    "MediumTurquoise":      ("#48D1CC", ( 72, 209, 204)),
    "Turquoise":            ("#40E0D0", ( 64, 224, 208)),
    "Cyan":                 ("#00FFFF", (  0, 255, 255)),
    "LightCyan":            ("#E0FFFF", (224, 255, 255)),
    "CadetBlue":            ("#5F9EA0", ( 95, 158, 160)),
    "MediumAquamarine":     ("#66CDAA", (102, 205, 170)),
    "Aquamarine":           ("#7FFFD4", (127, 255, 212)),
    "DarkGreen":            ("#006400", (  0, 100,   0)),
    "DarkOliveGreen":       ("#556B2F", ( 85, 107,  47)),
    "DarkSeaGreen":         ("#8FBC8F", (143, 188, 143)),
    "SeaGreen":             ("#2E8B57", ( 46, 139,  87)),
    "MediumSeaGreen":       ("#3CB371", ( 60, 179, 113)),
    "LightSeaGreen":        ("#20B2AA", ( 32, 178, 170)),
    "PaleGreen":            ("#98FB98", (152, 251, 152)),
    "SpringGreen":          ("#00FF7F", (  0, 255, 127)),
    "LawnGreen":            ("#7CFC00", (124, 252,   0)),
    "Green":                ("#00FF00", (  0, 255,   0)),
    "Chartreuse":           ("#7FFF00", (127, 255,   0)),
    "MediumSpringGreen":    ("#00FA9A", (  0, 250, 154)),
    "GreenYellow":          ("#ADFF2F", (173, 255,  47)),
    "LimeGreen":            ("#32CD32", ( 50, 205,  50)),
    "YellowGreen":          ("#9ACD32", (154, 205,  50)),
    "ForestGreen":          ("#228B22", ( 34, 139,  34)),
    "OliveDrab":            ("#6B8E23", (107, 142,  35)),
    "DarkKhaki":            ("#BDB76B", (189, 183, 107)),
    "PaleGoldenrod":        ("#EEE8AA", (238, 232, 170)),
    "LightGoldenrodYellow": ("#FAFAD2", (250, 250, 210)),
    "LightYellow":          ("#FFFFE0", (255, 255, 224)),
    "Yellow":               ("#FFFF00", (255, 255,   0)),
    "Gold":                 ("#FFD700", (255, 215,   0)),
    "LightGoldenrod":       ("#EEDD82", (238, 221, 130)),
    "goldenrod":            ("#DAA520", (218, 165,  32)),
    "DarkGoldenrod":        ("#B8860B", (184, 134,  11)),
    "RosyBrown":            ("#BC8F8F", (188, 143, 143)),
    "IndianRed":            ("#CD5C5C", (205,  92,  92)),
    "SaddleBrown":          ("#8B4513", (139,  69,  19)),
    "Sienna":               ("#A0522D", (160,  82,  45)),
    "Peru":                 ("#CD853F", (205, 133,  63)),
    "Burlywood":            ("#DEB887", (222, 184, 135)),
    "Beige":                ("#F5F5DC", (245, 245, 220)),
    "Wheat":                ("#F5DEB3", (245, 222, 179)),
    "SandyBrown":           ("#F4A460", (244, 164,  96)),
    "Tan":                  ("#D2B48C", (210, 180, 140)),
    "Chocolate":            ("#D2691E", (210, 105,  30)),
    "Firebrick":            ("#B22222", (178,  34,  34)),
    "Brown":                ("#A52A2A", (165,  42,  42)),
    "DarkSalmon":           ("#E9967A", (233, 150, 122)),
    "Salmon":               ("#FA8072", (250, 128, 114)),
    "LightSalmon":          ("#FFA07A", (255, 160, 122)),
    "Orange":               ("#FFA500", (255, 165,   0)),
    "DarkOrange":           ("#FF8C00", (255, 140,   0)),
    "Coral":                ("#FF7F50", (255, 127,  80)),
    "LightCoral":           ("#F08080", (240, 128, 128)),
    "Tomato":               ("#FF6347", (255,  99,  71)),
    "OrangeRed":            ("#FF4500", (255,  69,   0)),
    "Red":                  ("#FF0000", (255,   0,   0)),
    "HotPink":              ("#FF69B4", (255, 105, 180)),
    "DeepPink":             ("#FF1493", (255,  20, 147)),
    "Pink":                 ("#FFC0CB", (255, 192, 203)),
    "LightPink":            ("#FFB6C1", (255, 182, 193)),
    "PaleVioletRed":        ("#DB7093", (219, 112, 147)),
    "Maroon":               ("#B03060", (176,  48,  96)),
    "MediumVioletRed":      ("#C71585", (199,  21, 133)),
    "VioletRed":            ("#D02090", (208,  32, 144)),
    "Magenta":              ("#FF00FF", (255,   0, 255)),
    "Violet":               ("#EE82EE", (238, 130, 238)),
    "Plum":                 ("#DDA0DD", (221, 160, 221)),
    "Orchid":               ("#DA70D6", (218, 112, 214)),
    "MediumOrchid":         ("#BA55D3", (186,  85, 211)),
    "DarkOrchid":           ("#9932CC", (153,  50, 204)),
    "DarkViolet":           ("#9400D3", (148,   0, 211)),
    "BlueViolet":           ("#8A2BE2", (138,  43, 226)),
    "Purple":               ("#A020F0", (160,  32, 240)),
    "MediumPurple":         ("#9370DB", (147, 112, 219)),
    "Thistle":              ("#D8BFD8", (216, 191, 216)),
    "Snow1":                ("#FFFAFA", (255, 250, 250)),
    "Snow2":                ("#EEE9E9", (238, 233, 233)),
    "Snow3":                ("#CDC9C9", (205, 201, 201)),
    "Snow4":                ("#8B8989", (139, 137, 137)),
    "Seashell1":            ("#FFF5EE", (255, 245, 238)),
    "Seashell2":            ("#EEE5DE", (238, 229, 222)),
    "Seashell3":            ("#CDC5BF", (205, 197, 191)),
    "Seashell4":            ("#8B8682", (139, 134, 130)),
    "AntiqueWhite1":        ("#FFEFDB", (255, 239, 219)),
    "AntiqueWhite2":        ("#EEDFCC", (238, 223, 204)),
    "AntiqueWhite3":        ("#CDC0B0", (205, 192, 176)),
    "AntiqueWhite4":        ("#8B8378", (139, 131, 120)),
    "Bisque1":              ("#FFE4C4", (255, 228, 196)),
    "Bisque2":              ("#EED5B7", (238, 213, 183)),
    "Bisque3":              ("#CDB79E", (205, 183, 158)),
    "Bisque4":              ("#8B7D6B", (139, 125, 107)),
    "PeachPuff1":           ("#FFDAB9", (255, 218, 185)),
    "PeachPuff2":           ("#EECBAD", (238, 203, 173)),
    "PeachPuff3":           ("#CDAF95", (205, 175, 149)),
    "PeachPuff4":           ("#8B7765", (139, 119, 101)),
    "NavajoWhite1":         ("#FFDEAD", (255, 222, 173)),
    "NavajoWhite2":         ("#EECFA1", (238, 207, 161)),
    "NavajoWhite3":         ("#CDB38B", (205, 179, 139)),
    "NavajoWhite4":         ("#8B795E", (139, 121,  94)),
    "LemonChiffon1":        ("#FFFACD", (255, 250, 205)),
    "LemonChiffon2":        ("#EEE9BF", (238, 233, 191)),
    "LemonChiffon3":        ("#CDC9A5", (205, 201, 165)),
    "LemonChiffon4":        ("#8B8970", (139, 137, 112)),
    "Cornsilk1":            ("#FFF8DC", (255, 248, 220)),
    "Cornsilk2":            ("#EEE8CD", (238, 232, 205)),
    "Cornsilk3":            ("#CDC8B1", (205, 200, 177)),
    "Cornsilk4":            ("#8B8878", (139, 136, 120)),
    "Ivory1":               ("#FFFFF0", (255, 255, 240)),
    "Ivory2":               ("#EEEEE0", (238, 238, 224)),
    "Ivory3":               ("#CDCDC1", (205, 205, 193)),
    "Ivory4":               ("#8B8B83", (139, 139, 131)),
    "Honeydew1":            ("#F0FFF0", (240, 255, 240)),
    "Honeydew2":            ("#E0EEE0", (224, 238, 224)),
    "Honeydew3":            ("#C1CDC1", (193, 205, 193)),
    "Honeydew4":            ("#838B83", (131, 139, 131)),
    "LavenderBlush1":       ("#FFF0F5", (255, 240, 245)),
    "LavenderBlush2":       ("#EEE0E5", (238, 224, 229)),
    "LavenderBlush3":       ("#CDC1C5", (205, 193, 197)),
    "LavenderBlush4":       ("#8B8386", (139, 131, 134)),
    "MistyRose1":           ("#FFE4E1", (255, 228, 225)),
    "MistyRose2":           ("#EED5D2", (238, 213, 210)),
    "MistyRose3":           ("#CDB7B5", (205, 183, 181)),
    "MistyRose4":           ("#8B7D7B", (139, 125, 123)),
    "Azure1":               ("#F0FFFF", (240, 255, 255)),
    "Azure2":               ("#E0EEEE", (224, 238, 238)),
    "Azure3":               ("#C1CDCD", (193, 205, 205)),
    "Azure4":               ("#838B8B", (131, 139, 139)),
    "SlateBlue1":           ("#836FFF", (131, 111, 255)),
    "SlateBlue2":           ("#7A67EE", (122, 103, 238)),
    "SlateBlue3":           ("#6959CD", (105,  89, 205)),
    "SlateBlue4":           ("#473C8B", ( 71,  60, 139)),
    "RoyalBlue1":           ("#4876FF", ( 72, 118, 255)),
    "RoyalBlue2":           ("#436EEE", ( 67, 110, 238)),
    "RoyalBlue3":           ("#3A5FCD", ( 58,  95, 205)),
    "RoyalBlue4":           ("#27408B", ( 39,  64, 139)),
    "Blue1":                ("#0000FF", (  0,   0, 255)),
    "Blue2":                ("#0000EE", (  0,   0, 238)),
    "Blue3":                ("#0000CD", (  0,   0, 205)),
    "Blue4":                ("#00008B", (  0,   0, 139)),
    "DodgerBlue1":          ("#1E90FF", ( 30, 144, 255)),
    "DodgerBlue2":          ("#1C86EE", ( 28, 134, 238)),
    "DodgerBlue3":          ("#1874CD", ( 24, 116, 205)),
    "DodgerBlue4":          ("#104E8B", ( 16,  78, 139)),
    "SteelBlue1":           ("#63B8FF", ( 99, 184, 255)),
    "SteelBlue2":           ("#5CACEE", ( 92, 172, 238)),
    "SteelBlue3":           ("#4F94CD", ( 79, 148, 205)),
    "SteelBlue4":           ("#36648B", ( 54, 100, 139)),
    "DeepSkyBlue1":         ("#00BFFF", (  0, 191, 255)),
    "DeepSkyBlue2":         ("#00B2EE", (  0, 178, 238)),
    "DeepSkyBlue3":         ("#009ACD", (  0, 154, 205)),
    "DeepSkyBlue4":         ("#00688B", (  0, 104, 139)),
    "SkyBlue1":             ("#87CEFF", (135, 206, 255)),
    "SkyBlue2":             ("#7EC0EE", (126, 192, 238)),
    "SkyBlue3":             ("#6CA6CD", (108, 166, 205)),
    "SkyBlue4":             ("#4A708B", ( 74, 112, 139)),
    "LightSkyBlue1":        ("#B0E2FF", (176, 226, 255)),
    "LightSkyBlue2":        ("#A4D3EE", (164, 211, 238)),
    "LightSkyBlue3":        ("#8DB6CD", (141, 182, 205)),
    "LightSkyBlue4":        ("#607B8B", ( 96, 123, 139)),
    "SlateGray1":           ("#C6E2FF", (198, 226, 255)),
    "SlateGray2":           ("#B9D3EE", (185, 211, 238)),
    "SlateGray3":           ("#9FB6CD", (159, 182, 205)),
    "SlateGray4":           ("#6C7B8B", (108, 123, 139)),
    "LightSteelBlue1":      ("#CAE1FF", (202, 225, 255)),
    "LightSteelBlue2":      ("#BCD2EE", (188, 210, 238)),
    "LightSteelBlue3":      ("#A2B5CD", (162, 181, 205)),
    "LightSteelBlue4":      ("#6E7B8B", (110, 123, 139)),
    "LightBlue1":           ("#BFEFFF", (191, 239, 255)),
    "LightBlue2":           ("#B2DFEE", (178, 223, 238)),
    "LightBlue3":           ("#9AC0CD", (154, 192, 205)),
    "LightBlue4":           ("#68838B", (104, 131, 139)),
    "LightCyan1":           ("#E0FFFF", (224, 255, 255)),
    "LightCyan2":           ("#D1EEEE", (209, 238, 238)),
    "LightCyan3":           ("#B4CDCD", (180, 205, 205)),
    "LightCyan4":           ("#7A8B8B", (122, 139, 139)),
    "PaleTurquoise1":       ("#BBFFFF", (187, 255, 255)),
    "PaleTurquoise2":       ("#AEEEEE", (174, 238, 238)),
    "PaleTurquoise3":       ("#96CDCD", (150, 205, 205)),
    "PaleTurquoise4":       ("#668B8B", (102, 139, 139)),
    "CadetBlue1":           ("#98F5FF", (152, 245, 255)),
    "CadetBlue2":           ("#8EE5EE", (142, 229, 238)),
    "CadetBlue3":           ("#7AC5CD", (122, 197, 205)),
    "CadetBlue4":           ("#53868B", ( 83, 134, 139)),
    "Turquoise1":           ("#00F5FF", (  0, 245, 255)),
    "Turquoise2":           ("#00E5EE", (  0, 229, 238)),
    "Turquoise3":           ("#00C5CD", (  0, 197, 205)),
    "Turquoise4":           ("#00868B", (  0, 134, 139)),
    "Cyan1":                ("#00FFFF", (  0, 255, 255)),
    "Cyan2":                ("#00EEEE", (  0, 238, 238)),
    "Cyan3":                ("#00CDCD", (  0, 205, 205)),
    "Cyan4":                ("#008B8B", (  0, 139, 139)),
    "DarkSlateGray1":       ("#97FFFF", (151, 255, 255)),
    "DarkSlateGray2":       ("#8DEEEE", (141, 238, 238)),
    "DarkSlateGray3":       ("#79CDCD", (121, 205, 205)),
    "DarkSlateGray4":       ("#528B8B", ( 82, 139, 139)),
    "Aquamarine1":          ("#7FFFD4", (127, 255, 212)),
    "Aquamarine2":          ("#76EEC6", (118, 238, 198)),
    "Aquamarine3":          ("#66CDAA", (102, 205, 170)),
    "Aquamarine4":          ("#458B74", ( 69, 139, 116)),
    "DarkSeaGreen1":        ("#C1FFC1", (193, 255, 193)),
    "DarkSeaGreen2":        ("#B4EEB4", (180, 238, 180)),
    "DarkSeaGreen3":        ("#9BCD9B", (155, 205, 155)),
    "DarkSeaGreen4":        ("#698B69", (105, 139, 105)),
    "SeaGreen1":            ("#54FF9F", ( 84, 255, 159)),
    "SeaGreen2":            ("#4EEE94", ( 78, 238, 148)),
    "SeaGreen3":            ("#43CD80", ( 67, 205, 128)),
    "SeaGreen4":            ("#2E8B57", ( 46, 139,  87)),
    "PaleGreen1":           ("#9AFF9A", (154, 255, 154)),
    "PaleGreen2":           ("#90EE90", (144, 238, 144)),
    "PaleGreen3":           ("#7CCD7C", (124, 205, 124)),
    "PaleGreen4":           ("#548B54", ( 84, 139,  84)),
    "SpringGreen1":         ("#00FF7F", (  0, 255, 127)),
    "SpringGreen2":         ("#00EE76", (  0, 238, 118)),
    "SpringGreen3":         ("#00CD66", (  0, 205, 102)),
    "SpringGreen4":         ("#008B45", (  0, 139,  69)),
    "Green1":               ("#00FF00", (  0, 255,   0)),
    "Green2":               ("#00EE00", (  0, 238,   0)),
    "Green3":               ("#00CD00", (  0, 205,   0)),
    "Green4":               ("#008B00", (  0, 139,   0)),
    "Chartreuse1":          ("#7FFF00", (127, 255,   0)),
    "Chartreuse2":          ("#76EE00", (118, 238,   0)),
    "Chartreuse3":          ("#66CD00", (102, 205,   0)),
    "Chartreuse4":          ("#458B00", ( 69, 139,   0)),
    "OliveDrab1":           ("#C0FF3E", (192, 255,  62)),
    "OliveDrab2":           ("#B3EE3A", (179, 238,  58)),
    "OliveDrab3":           ("#9ACD32", (154, 205,  50)),
    "OliveDrab4":           ("#698B22", (105, 139,  34)),
    "DarkOliveGreen1":      ("#CAFF70", (202, 255, 112)),
    "DarkOliveGreen2":      ("#BCEE68", (188, 238, 104)),
    "DarkOliveGreen3":      ("#A2CD5A", (162, 205,  90)),
    "DarkOliveGreen4":      ("#6E8B3D", (110, 139,  61)),
    "Khaki1":               ("#FFF68F", (255, 246, 143)),
    "Khaki2":               ("#EEE685", (238, 230, 133)),
    "Khaki3":               ("#CDC673", (205, 198, 115)),
    "Khaki4":               ("#8B864E", (139, 134,  78)),
    "LightGoldenrod1":      ("#FFEC8B", (255, 236, 139)),
    "LightGoldenrod2":      ("#EEDC82", (238, 220, 130)),
    "LightGoldenrod3":      ("#CDBE70", (205, 190, 112)),
    "LightGoldenrod4":      ("#8B814C", (139, 129,  76)),
    "LightYellow1":         ("#FFFFE0", (255, 255, 224)),
    "LightYellow2":         ("#EEEED1", (238, 238, 209)),
    "LightYellow3":         ("#CDCDB4", (205, 205, 180)),
    "LightYellow4":         ("#8B8B7A", (139, 139, 122)),
    "Yellow1":              ("#FFFF00", (255, 255,   0)),
    "Yellow2":              ("#EEEE00", (238, 238,   0)),
    "Yellow3":              ("#CDCD00", (205, 205,   0)),
    "Yellow4":              ("#8B8B00", (139, 139,   0)),
    "Gold1":                ("#FFD700", (255, 215,   0)),
    "Gold2":                ("#EEC900", (238, 201,   0)),
    "Gold3":                ("#CDAD00", (205, 173,   0)),
    "Gold4":                ("#8B7500", (139, 117,   0)),
    "Goldenrod1":           ("#FFC125", (255, 193,  37)),
    "Goldenrod2":           ("#EEB422", (238, 180,  34)),
    "Goldenrod3":           ("#CD9B1D", (205, 155,  29)),
    "Goldenrod4":           ("#8B6914", (139, 105,  20)),
    "DarkGoldenrod1":       ("#FFB90F", (255, 185,  15)),
    "DarkGoldenrod2":       ("#EEAD0E", (238, 173,  14)),
    "DarkGoldenrod3":       ("#CD950C", (205, 149,  12)),
    "DarkGoldenrod4":       ("#8B658B", (139, 101,   8)),
    "RosyBrown1":           ("#FFC1C1", (255, 193, 193)),
    "RosyBrown2":           ("#EEB4B4", (238, 180, 180)),
    "RosyBrown3":           ("#CD9B9B", (205, 155, 155)),
    "RosyBrown4":           ("#8B6969", (139, 105, 105)),
    "IndianRed1":           ("#FF6A6A", (255, 106, 106)),
    "IndianRed2":           ("#EE6363", (238,  99,  99)),
    "IndianRed3":           ("#CD5555", (205,  85,  85)),
    "IndianRed4":           ("#8B3A3A", (139,  58,  58)),
    "Sienna1":              ("#FF8247", (255, 130,  71)),
    "Sienna2":              ("#EE7942", (238, 121,  66)),
    "Sienna3":              ("#CD6839", (205, 104,  57)),
    "Sienna4":              ("#8B4726", (139,  71,  38)),
    "Burlywood1":           ("#FFD39B", (255, 211, 155)),
    "Burlywood2":           ("#EEC591", (238, 197, 145)),
    "Burlywood3":           ("#CDAA7D", (205, 170, 125)),
    "Burlywood4":           ("#8B7355", (139, 115,  85)),
    "Wheat1":               ("#FFE7BA", (255, 231, 186)),
    "Wheat2":               ("#EED8AE", (238, 216, 174)),
    "Wheat3":               ("#CDBA96", (205, 186, 150)),
    "Wheat4":               ("#8B7E66", (139, 126, 102)),
    "Tan1":                 ("#FFA54F", (255, 165,  79)),
    "Tan2":                 ("#EE9A49", (238, 154,  73)),
    "Tan3":                 ("#CD853F", (205, 133,  63)),
    "Tan4":                 ("#8B5A2B", (139,  90,  43)),
    "Chocolate1":           ("#FF7F24", (255, 127,  36)),
    "Chocolate2":           ("#EE7621", (238, 118,  33)),
    "Chocolate3":           ("#CD661D", (205, 102,  29)),
    "Chocolate4":           ("#8B4513", (139,  69,  19)),
    "Firebrick1":           ("#FF3030", (255,  48,  48)),
    "Firebrick2":           ("#EE2C2C", (238,  44,  44)),
    "Firebrick3":           ("#CD2626", (205,  38,  38)),
    "Firebrick4":           ("#8B1A1A", (139,  26,  26)),
    "Brown1":               ("#FF4040", (255,  64,  64)),
    "Brown2":               ("#EE3B3B", (238,  59,  59)),
    "Brown3":               ("#CD3333", (205,  51,  51)),
    "Brown4":               ("#8B2323", (139,  35,  35)),
    "Salmon1":              ("#FF8C69", (255, 140, 105)),
    "Salmon2":              ("#EE8262", (238, 130,  98)),
    "Salmon3":              ("#CD7054", (205, 112,  84)),
    "Salmon4":              ("#8B4C39", (139,  76,  57)),
    "LightSalmon1":         ("#FFA07A", (255, 160, 122)),
    "LightSalmon2":         ("#EE9572", (238, 149, 114)),
    "LightSalmon3":         ("#CD8162", (205, 129,  98)),
    "LightSalmon4":         ("#8B5742", (139,  87,  66)),
    "Orange1":              ("#FFA500", (255, 165,   0)),
    "Orange2":              ("#EE9A00", (238, 154,   0)),
    "Orange3":              ("#CD8500", (205, 133,   0)),
    "Orange4":              ("#8B5A00", (139,  90,   0)),
    "DarkOrange1":          ("#FF7F00", (255, 127,   0)),
    "DarkOrange2":          ("#EE7600", (238, 118,   0)),
    "DarkOrange3":          ("#CD6600", (205, 102,   0)),
    "DarkOrange4":          ("#8B4500", (139,  69,   0)),
    "Coral1":               ("#FF7256", (255, 114,  86)),
    "Coral2":               ("#EE6A50", (238, 106,  80)),
    "Coral3":               ("#CD5B45", (205,  91,  69)),
    "Coral4":               ("#8B3E2F", (139,  62,  47)),
    "Tomato1":              ("#FF6347", (255,  99,  71)),
    "Tomato2":              ("#EE5C42", (238,  92,  66)),
    "Tomato3":              ("#CD4F39", (205,  79,  57)),
    "Tomato4":              ("#8B3626", (139,  54,  38)),
    "OrangeRed1":           ("#FF4500", (255,  69,   0)),
    "OrangeRed2":           ("#EE4000", (238,  64,   0)),
    "OrangeRed3":           ("#CD3700", (205,  55,   0)),
    "OrangeRed4":           ("#8B2500", (139,  37,   0)),
    "Red1":                 ("#FF0000", (255,   0,   0)),
    "Red2":                 ("#EE0000", (238,   0,   0)),
    "Red3":                 ("#CD0000", (205,   0,   0)),
    "Red4":                 ("#8B0000", (139,   0,   0)),
    "DeepPink1":            ("#FF1493", (255,  20, 147)),
    "DeepPink2":            ("#EE1289", (238,  18, 137)),
    "DeepPink3":            ("#CD1076", (205,  16, 118)),
    "DeepPink4":            ("#8B0A50", (139,  10,  80)),
    "HotPink1":             ("#FF6EB4", (255, 110, 180)),
    "HotPink2":             ("#EE6AA7", (238, 106, 167)),
    "HotPink3":             ("#CD6090", (205,  96, 144)),
    "HotPink4":             ("#8B3A62", (139,  58,  98)),
    "Pink1":                ("#FFB5C5", (255, 181, 197)),
    "Pink2":                ("#EEA9B8", (238, 169, 184)),
    "Pink3":                ("#CD919E", (205, 145, 158)),
    "Pink4":                ("#8B636C", (139,  99, 108)),
    "LightPink1":           ("#FFAEB9", (255, 174, 185)),
    "LightPink2":           ("#EEA2AD", (238, 162, 173)),
    "LightPink3":           ("#CD8C95", (205, 140, 149)),
    "LightPink4":           ("#8B5F65", (139,  95, 101)),
    "PaleVioletRed1":       ("#FF82AB", (255, 130, 171)),
    "PaleVioletRed2":       ("#EE799F", (238, 121, 159)),
    "PaleVioletRed3":       ("#CD6889", (205, 104, 137)),
    "PaleVioletRed4":       ("#8B475D", (139,  71,  93)),
    "Maroon1":              ("#FF34B3", (255,  52, 179)),
    "Maroon2":              ("#EE30A7", (238,  48, 167)),
    "Maroon3":              ("#CD2990", (205,  41, 144)),
    "Maroon4":              ("#8B1C62", (139,  28,  98)),
    "VioletRed1":           ("#FF3E96", (255,  62, 150)),
    "VioletRed2":           ("#EE3A8C", (238,  58, 140)),
    "VioletRed3":           ("#CD3278", (205,  50, 120)),
    "VioletRed4":           ("#8B2252", (139,  34,  82)),
    "Magenta1":             ("#FF00FF", (255,   0, 255)),
    "Magenta2":             ("#EE00EE", (238,   0, 238)),
    "Magenta3":             ("#CD00CD", (205,   0, 205)),
    "Magenta4":             ("#8B008B", (139,   0, 139)),
    "Orchid1":              ("#FF83FA", (255, 131, 250)),
    "Orchid2":              ("#EE7AE9", (238, 122, 233)),
    "Orchid3":              ("#CD69C9", (205, 105, 201)),
    "Orchid4":              ("#8B4789", (139,  71, 137)),
    "Plum1":                ("#FFBBFF", (255, 187, 255)),
    "Plum2":                ("#EEAEEE", (238, 174, 238)),
    "Plum3":                ("#CD96CD", (205, 150, 205)),
    "Plum4":                ("#8B668B", (139, 102, 139)),
    "MediumOrchid1":        ("#E066FF", (224, 102, 255)),
    "MediumOrchid2":        ("#D15FEE", (209,  95, 238)),
    "MediumOrchid3":        ("#B452CD", (180,  82, 205)),
    "MediumOrchid4":        ("#7A378B", (122,  55, 139)),
    "DarkOrchid1":          ("#BF3EFF", (191,  62, 255)),
    "DarkOrchid2":          ("#B23AEE", (178,  58, 238)),
    "DarkOrchid3":          ("#9A32CD", (154,  50, 205)),
    "DarkOrchid4":          ("#68228B", (104,  34, 139)),
    "Purple1":              ("#9B30FF", (155,  48, 255)),
    "Purple2":              ("#912CEE", (145,  44, 238)),
    "Purple3":              ("#7D26CD", (125,  38, 205)),
    "Purple4":              ("#551A8B", ( 85,  26, 139)),
    "MediumPurple1":        ("#AB82FF", (171, 130, 255)),
    "MediumPurple2":        ("#9F79EE", (159, 121, 238)),
    "MediumPurple3":        ("#8968CD", (137, 104, 205)),
    "MediumPurple4":        ("#5D478B", ( 93,  71, 139)),
    "Thistle1":             ("#FFE1FF", (255, 225, 255)),
    "Thistle2":             ("#EED2EE", (238, 210, 238)),
    "Thistle3":             ("#CDB5CD", (205, 181, 205)),
    "Thistle4":             ("#8B7B8B", (139, 123, 139)),
    "grey11":               ("#1C1C1C", ( 28,  28,  28)),
    "grey21":               ("#363636", ( 54,  54,  54)),
    "grey31":               ("#4F4F4F", ( 79,  79,  79)),
    "grey41":               ("#696969", (105, 105, 105)),
    "grey51":               ("#828282", (130, 130, 130)),
    "grey61":               ("#9C9C9C", (156, 156, 156)),
    "grey71":               ("#B5B5B5", (181, 181, 181)),
    "gray81":               ("#CFCFCF", (207, 207, 207)),
    "gray91":               ("#E8E8E8", (232, 232, 232)),
    "DarkGrey":             ("#A9A9A9", (169, 169, 169)),
    "DarkBlue":             ("#00008B", (  0,   0, 139)),
    "DarkCyan":             ("#008B8B", (  0, 139, 139)),
    "DarkMagenta":          ("#8B008B", (139,   0, 139)),
    "DarkRed":              ("#8B0000", (139,   0,   0)),
    "LightGreen":           ("#90EE90", (144, 238, 144)),
}

gv_colors = (
    "aliceblue", "antiquewhite", "antiquewhite1",
    "antiquewhite2", "antiquewhite3", "antiquewhite4", "aqua",
    "aquamarine", "aquamarine1", "aquamarine2", "aquamarine3",
    "aquamarine4", "azure", "azure1", "azure2", "azure3",
    "azure4", "beige", "bisque", "bisque1", "bisque2",
    "bisque3", "bisque4", "black", "blanchedalmond", "blue",
    "blue1", "blue2", "blue3", "blue4", "blueviolet", "brown",
    "brown1", "brown2", "brown3", "brown4", "burlywood",
    "burlywood1", "burlywood2", "burlywood3", "burlywood4",
    "cadetblue", "cadetblue1", "cadetblue2", "cadetblue3",
    "cadetblue4", "chartreuse", "chartreuse1", "chartreuse2",
    "chartreuse3", "chartreuse4", "chocolate", "chocolate1",
    "chocolate2", "chocolate3", "chocolate4", "coral",
    "coral1", "coral2", "coral3", "coral4", "cornflowerblue",
    "cornsilk", "cornsilk1", "cornsilk2", "cornsilk3",
    "cornsilk4", "crimson", "cyan", "cyan1", "cyan2", "cyan3",
    "cyan4", "darkblue", "darkcyan", "darkgoldenrod",
    "darkgoldenrod1", "darkgoldenrod2", "darkgoldenrod3",
    "darkgoldenrod4", "darkgray", "darkgreen", "darkgrey",
    "darkkhaki", "darkmagenta", "darkolivegreen",
    "darkolivegreen1", "darkolivegreen2", "darkolivegreen3",
    "darkolivegreen4", "darkorange", "darkorange1",
    "darkorange2", "darkorange3", "darkorange4", "darkorchid",
    "darkorchid1", "darkorchid2", "darkorchid3", "darkorchid4",
    "darkred", "darksalmon", "darkseagreen", "darkseagreen1",
    "darkseagreen2", "darkseagreen3", "darkseagreen4",
    "darkslateblue", "darkslategray", "darkslategray1",
    "darkslategray2", "darkslategray3", "darkslategray4",
    "darkslategrey", "darkturquoise", "darkviolet", "deeppink",
    "deeppink1", "deeppink2", "deeppink3", "deeppink4",
    "deepskyblue", "deepskyblue1", "deepskyblue2",
    "deepskyblue3", "deepskyblue4", "dimgray", "dimgrey",
    "dodgerblue", "dodgerblue1", "dodgerblue2", "dodgerblue3",
    "dodgerblue4", "firebrick", "firebrick1", "firebrick2",
    "firebrick3", "firebrick4", "floralwhite", "forestgreen",
    "fuchsia", "gainsboro", "ghostwhite", "gold", "gold1",
    "gold2", "gold3", "gold4", "goldenrod", "goldenrod1",
    "goldenrod2", "goldenrod3", "goldenrod4", "gray", "gray0",
    "gray1", "gray10", "gray100", "gray11", "gray12", "gray13",
    "gray14", "gray15", "gray16", "gray17", "gray18", "gray19",
    "gray2", "gray20", "gray21", "gray22", "gray23", "gray24",
    "gray25", "gray26", "gray27", "gray28", "gray29", "gray3",
    "gray30", "gray31", "gray32", "gray33", "gray34", "gray35",
    "gray36", "gray37", "gray38", "gray39", "gray4", "gray40",
    "gray41", "gray42", "gray43", "gray44", "gray45", "gray46",
    "gray47", "gray48", "gray49", "gray5", "gray50", "gray51",
    "gray52", "gray53", "gray54", "gray55", "gray56", "gray57",
    "gray58", "gray59", "gray6", "gray60", "gray61", "gray62",
    "gray63", "gray64", "gray65", "gray66", "gray67", "gray68",
    "gray69", "gray7", "gray70", "gray71", "gray72", "gray73",
    "gray74", "gray75", "gray76", "gray77", "gray78", "gray79",
    "gray8", "gray80", "gray81", "gray82", "gray83", "gray84",
    "gray85", "gray86", "gray87", "gray88", "gray89", "gray9",
    "gray90", "gray91", "gray92", "gray93", "gray94", "gray95",
    "gray96", "gray97", "gray98", "gray99", "green", "green1",
    "green2", "green3", "green4", "greenyellow", "grey",
    "grey0", "grey1", "grey10", "grey100", "grey11", "grey12",
    "grey13", "grey14", "grey15", "grey16", "grey17", "grey18",
    "grey19", "grey2", "grey20", "grey21", "grey22", "grey23",
    "grey24", "grey25", "grey26", "grey27", "grey28", "grey29",
    "grey3", "grey30", "grey31", "grey32", "grey33", "grey34",
    "grey35", "grey36", "grey37", "grey38", "grey39", "grey4",
    "grey40", "grey41", "grey42", "grey43", "grey44", "grey45",
    "grey46", "grey47", "grey48", "grey49", "grey5", "grey50",
    "grey51", "grey52", "grey53", "grey54", "grey55", "grey56",
    "grey57", "grey58", "grey59", "grey6", "grey60", "grey61",
    "grey62", "grey63", "grey64", "grey65", "grey66", "grey67",
    "grey68", "grey69", "grey7", "grey70", "grey71", "grey72",
    "grey73", "grey74", "grey75", "grey76", "grey77", "grey78",
    "grey79", "grey8", "grey80", "grey81", "grey82", "grey83",
    "grey84", "grey85", "grey86", "grey87", "grey88", "grey89",
    "grey9", "grey90", "grey91", "grey92", "grey93", "grey94",
    "grey95", "grey96", "grey97", "grey98", "grey99",
    "honeydew", "honeydew1", "honeydew2", "honeydew3",
    "honeydew4", "hotpink", "hotpink1", "hotpink2", "hotpink3",
    "hotpink4", "indianred", "indianred1", "indianred2",
    "indianred3", "indianred4", "indigo", "invis", "ivory",
    "ivory1", "ivory2", "ivory3", "ivory4", "khaki", "khaki1",
    "khaki2", "khaki3", "khaki4", "lavender", "lavenderblush",
    "lavenderblush1", "lavenderblush2", "lavenderblush3",
    "lavenderblush4", "lawngreen", "lemonchiffon",
    "lemonchiffon1", "lemonchiffon2", "lemonchiffon3",
    "lemonchiffon4", "lightblue", "lightblue1", "lightblue2",
    "lightblue3", "lightblue4", "lightcoral", "lightcyan",
    "lightcyan1", "lightcyan2", "lightcyan3", "lightcyan4",
    "lightgoldenrod", "lightgoldenrod1", "lightgoldenrod2",
    "lightgoldenrod3", "lightgoldenrod4",
    "lightgoldenrodyellow", "lightgray", "lightgreen",
    "lightgrey", "lightpink", "lightpink1", "lightpink2",
    "lightpink3", "lightpink4", "lightsalmon", "lightsalmon1",
    "lightsalmon2", "lightsalmon3", "lightsalmon4",
    "lightseagreen", "lightskyblue", "lightskyblue1",
    "lightskyblue2", "lightskyblue3", "lightskyblue4",
    "lightslateblue", "lightslategray", "lightslategrey",
    "lightsteelblue", "lightsteelblue1", "lightsteelblue2",
    "lightsteelblue3", "lightsteelblue4", "lightyellow",
    "lightyellow1", "lightyellow2", "lightyellow3",
    "lightyellow4", "lime", "limegreen", "linen", "magenta",
    "magenta1", "magenta2", "magenta3", "magenta4", "maroon",
    "maroon1", "maroon2", "maroon3", "maroon4",
    "mediumaquamarine", "mediumblue", "mediumorchid",
    "mediumorchid1", "mediumorchid2", "mediumorchid3",
    "mediumorchid4", "mediumpurple", "mediumpurple1",
    "mediumpurple2", "mediumpurple3", "mediumpurple4",
    "mediumseagreen", "mediumslateblue", "mediumspringgreen",
    "mediumturquoise", "mediumvioletred", "midnightblue",
    "mintcream", "mistyrose", "mistyrose1", "mistyrose2",
    "mistyrose3", "mistyrose4", "moccasin", "navajowhite",
    "navajowhite1", "navajowhite2", "navajowhite3",
    "navajowhite4", "navy", "navyblue", "none", "oldlace",
    "olive", "olivedrab", "olivedrab1", "olivedrab2",
    "olivedrab3", "olivedrab4", "orange", "orange1", "orange2",
    "orange3", "orange4", "orangered", "orangered1",
    "orangered2", "orangered3", "orangered4", "orchid",
    "orchid1", "orchid2", "orchid3", "orchid4",
    "palegoldenrod", "palegreen", "palegreen1", "palegreen2",
    "palegreen3", "palegreen4", "paleturquoise",
    "paleturquoise1", "paleturquoise2", "paleturquoise3",
    "paleturquoise4", "palevioletred", "palevioletred1",
    "palevioletred2", "palevioletred3", "palevioletred4",
    "papayawhip", "peachpuff", "peachpuff1", "peachpuff2",
    "peachpuff3", "peachpuff4", "peru", "pink", "pink1",
    "pink2", "pink3", "pink4", "plum", "plum1", "plum2",
    "plum3", "plum4", "powderblue", "purple", "purple1",
    "purple2", "purple3", "purple4", "rebeccapurple", "red",
    "red1", "red2", "red3", "red4", "rosybrown", "rosybrown1",
    "rosybrown2", "rosybrown3", "rosybrown4", "royalblue",
    "royalblue1", "royalblue2", "royalblue3", "royalblue4",
    "saddlebrown", "salmon", "salmon1", "salmon2", "salmon3",
    "salmon4", "sandybrown", "seagreen", "seagreen1",
    "seagreen2", "seagreen3", "seagreen4", "seashell",
    "seashell1", "seashell2", "seashell3", "seashell4",
    "sienna", "sienna1", "sienna2", "sienna3", "sienna4",
    "silver", "skyblue", "skyblue1", "skyblue2", "skyblue3",
    "skyblue4", "slateblue", "slateblue1", "slateblue2",
    "slateblue3", "slateblue4", "slategray", "slategray1",
    "slategray2", "slategray3", "slategray4", "slategrey",
    "snow", "snow1", "snow2", "snow3", "snow4", "springgreen",
    "springgreen1", "springgreen2", "springgreen3",
    "springgreen4", "steelblue", "steelblue1", "steelblue2",
    "steelblue3", "steelblue4", "tan", "tan1", "tan2", "tan3",
    "tan4", "teal", "thistle", "thistle1", "thistle2",
    "thistle3", "thistle4", "tomato", "tomato1", "tomato2",
    "tomato3", "tomato4", "transparent", "turquoise",
    "turquoise1", "turquoise2", "turquoise3", "turquoise4",
    "violet", "violetred", "violetred1", "violetred2",
    "violetred3", "violetred4", "webgray", "webgreen",
    "webgrey", "webmaroon", "webpurple", "wheat", "wheat1",
    "wheat2", "wheat3", "wheat4", "white", "whitesmoke",
    "x11gray", "x11green", "x11grey", "x11maroon", "x11purple",
    "yellow", "yellow1", "yellow2", "yellow3", "yellow4", "yellowgreen"
)


colors = {}
color_num = len(rgbs)

class Color(object):
    @staticmethod
    def rgb2gray(r, g, b) -> int:
        return (r * 299 + g * 587 + b * 114 + 500) // 1000

    @staticmethod
    def hexcode2rgb(hexcode:str) -> list:
        '''hexcode: #000000'''
        r = int(hexcode[1:3], 16)
        g = int(hexcode[3:5], 16)
        b = int(hexcode[5:7], 16)
        return r, g, b

    @staticmethod
    def rgb2hexcode(r, g, b) -> str:
        hexcode = "#{:02X}{:02X}{:02X}".format(r, g, b)
        return hexcode

    @staticmethod
    def rgbinverse(r, g, b) -> list:
        _r, _g, _b = [255 - x for x in (r, g, b)]
        return _r, _g, _b

    @staticmethod
    def rgbcomplement(r, g, b) -> list:
        _r, _g, _b = [max(r, g, b) + min(r, g, b) - x for x in (r, g, b)]
        return _r, _g, _b

class GvColor(Color):

    def __init__(self, name=None, hexcode=None, rgb=()):
        c = None
        if name in colors:
            c = colors[name]
        elif hexcode in colors:
            c = colors[hexcode]
        elif len(rgb) == 3:
            r, g, b = rgb[0], rgb[1], rgb[2]
            hexcode = self.rgb2hexcode(r, g, b)
            if hexcode in colors:
                c = colors[hexcode]

        if c is None:
            if name in rgbs.keys():
                val = rgbs[name]
                hexcode = val[0]
                r, g, b = val[1]
            elif hexcode is not None:
                name = "unkown"
                r, g, b = self.hexcode2rgb(hexcode)
            elif len(rgb) == 3:
                name = "unkown"
                r, g, b = rgb[0], rgb[1], rgb[2]
                hexcode = self.rgb2hexcode(r, g, b)
        else:
            name = c.name
            hexcode = c.hexcode
            r, g, b = c.r, c.g, c.b

        self._name = name
        self._hexcode = hexcode
        self._r = r
        self._g = g
        self._b = b
        self._rgb = (r, g, b)
        self._gray = self.rgb2gray(r, g, b)

    def __str__(self):
        return self.name

    def str(self):
        return self.hexcode if self.unkown() else self.name

    @property
    def name(self):
        return self._name

    @property
    def hexcode(self):
        return self._hexcode

    @property
    def r(self):
        return self._r

    @property
    def g(self):
        return self._g

    @property
    def b(self):
        return self._b

    @property
    def rgb(self):
        return self._rgb

    @property
    def gray(self):
        return self._gray

    def unkown(self):
        return self.name == "unkown"

    def inverse(self):
        r, g, b = GvColor.rgbinverse(self.r, self.g, self.b)
        hexcode = GvColor.rgb2hexcode(r, g, b)
        if hexcode in colors:
            return colors[hexcode].str()
        return hexcode

    def complement(self):
        r, g, b = GvColor.rgbcomplement(self.r, self.g, self.b)
        hexcode = GvColor.rgb2hexcode(r, g, b)
        if hexcode in colors:
            return colors[hexcode].str()
        return hexcode

'''
class newcolors(object):
    def __getitem__(self, key):
        if isinstance(key, int):
            name = rgbs.keys()[key]
            return GvColor(name)

        if isinstance(key, str):
            if key in rgbs.keys():
                return GvColor(key)

    def __len__(self):
        return len(rgbs)
'''

for i, name in enumerate(rgbs.keys()):
    c = GvColor(name)
    colors[i] = c
    colors[name] = c
    colors[name.lower()] = c
    colors[c.hexcode] = c
    colors[c.hexcode.lower()] = c

def colors_by_gray(vmin:int=0, vmax:int=256) -> list:
    if vmin < 0:
        vmin = 0
    if vmax > 256:
        vmax = 256
    if vmin == 0 and vmax == 256:
        return colors
    clist = []
    for i in range(0, color_num):
        if vmin <= colors[i].gray < vmax:
            clist.append(colors[i])
    return clist

def get_color(index:int, min_gray:int=0, max_gray:int=256, clist=None):
    def __get_color_from(index:int, clist):
        l = len(clist)
        if l > len(rgbs.keys()):
            l = len(rgbs.keys())
        index %= l
        return clist[index]

    if clist:
        return __get_color_from(index, clist)

    clist = colors_by_gray(vmin=min_gray, vmax=max_gray)
    return __get_color_from(index, clist)

import zlib

def random_color(string:str, min_gray:int=0, max_gray:int=256, clist=None):
    def string_hash(s:str):
        s = s.encode("utf-8")
        h = zlib.crc32(s)
        return int(h)

    index = string_hash(string)

    return get_color(index, min_gray, max_gray, clist=clist)
